<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <form action="" id="form" method="post" enctype="multipart/form-data" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">轮播图<span class="check-tips">(最大不超过2M，宽高比为5:2，支持 jpg、gif、png、jpeg 格式)</span></label>
            <!--<p><img src="__ROOT__/Uploads/test/test.jpg" width="400px" height="270px" /></p>-->
            <input style="margin-bottom: 20px;" type="file" name="file" required="required" />
        </div>
        <div class="form-item">
            <label class="item-label">题目<span class="check-tips"></span></label>
            <div class="controls">
                <input name="title" class="text input-large" value="">
            </div>
        </div>
        <!-- 隐藏域 -->
        <div hidden="hidden">
            <input id="type" name="type" value="1" />
        </div>
        <div class="notice">
            <div class="notice-tit" id="notice-tit">
                <ul>
                    <li class="selected">第三方链接</li>
                    <li>本地链接</li>
                    <li>图文混排</li>
                </ul>
            </div>
            <div class="notice-con" id="notice-con">
                <div class="form-item" style="display:block">
                    <label class="item-label">第三方URL地址<span class="check-tips"></span></label>
                    <div class="controls">
                        <label class="textarea input-large">
                            <textarea name="url"></textarea>
                        </label>
                    </div>
                </div>
                <div class="form-item">
                    <label class="item-label">本地URL地址<span class="check-tips"></span></label>
                    <div class="controls">
                        <label class="textarea input-large">
                            <textarea name="local_url"></textarea>
                        </label>
                    </div>
                </div>
                <div class="form-item">
                    <label class="item-label">内容<span class="check-tips"></span></label>
                    <div class="controls">
                        <label class="textarea">
                            <textarea name="content"></textarea>
                            <!--调用documentEditFormContent编辑器钩子-->
                            {:hook('documentEditFormContent', array('name'=>"content",'value'=>''))}
                        </label>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-item">
            <input class="btn submit-btn" type="submit" value="确 定"/>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <!-- 引入CSS、JS开始 -->
    <link href="__CSS__/wash_helper/tab_add.css" rel="stylesheet" type="text/css">
    <!-- 引入CSS、JS结束 -->
    <script type="text/javascript">
        /* 当前子菜单栏高亮 */
        highlight_subnav('{:U('Clean/lunbo')}');

        /*TAB选项卡*/
        $('#notice-tit li').click(function() {
            $(this).siblings().removeClass('selected');
            $(this).addClass('selected');

            var index = $(this).index();  // 获取当前点击元素的下标
            $('#notice-con .form-item').hide();
            $('#notice-con .form-item').eq(index).show();

            $("#type").attr("value",index+1);
        });
    </script>
</block>